{% extends "base.html" %}

{% block greeting %}
  <h2>Search <strong>10 male athletes</strong> across the web</h2>
  <h4>Who is the best male athlete of all-time?</h4>
{% endblock greeting %}

{% block form %}
  <form action="/" method="post" name="vote_form">
    {% for name in stats.top_names %}
      {% if forloop.first %}
        <input type="radio" name="chosen_athlete" value="{{ forloop.counter0 }}" checked /> {{ name }}<br/>
      {% else %}
        <input type="radio" name="chosen_athlete" value="{{ forloop.counter0 }}" /> {{ name }}<br/>
      {% endif %}
    {% endfor %}
    <br/>
	<input type="submit" name="submit_button" value="Submit">
  </form>
{% endblock form %}

{% block comments %}
  <h4>{{ explanation.title }}</h4>
  {% for comment in explanation.comments %}
    {{ comment }}<br/>
  {% endfor %}
  <h3>We made a profit of {{ stats.profit }} from {{ stats.searches }} search{{ stats.searches|pluralize:"es" }}!</h3>
{% endblock comments %}